package com.hjjt.baselib

import android.view.View
import android.widget.TextView
import androidx.databinding.BindingAdapter


@BindingAdapter("visibility")
fun visibility(view: View, show: Boolean) {
    view.visibility = if (show) View.VISIBLE else View.GONE
}

@BindingAdapter("objectToString")
fun objectToString(view: TextView, text: Any) {
    view.text = text.toString()
}